#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>

int count = 0;
void handler(int signo)
{
  printf("get a signal:%d  count:%d\n", signo, count);
  exit(0);
}

int main()
{
  signal(14, handler);
  alarm(1);
  //unsigned int left_second4 = alarm(10);
  //unsigned int left_second3 = alarm(5);
  //unsigned int left_second1 = alarm(3);
  //sleep(1);
  //unsigned int left_second2 = alarm(1);
  //printf("left_second1:%d\n", left_second1);
  //printf("left_second2:%d\n", left_second2);
  //printf("left_second3:%d\n", left_second3);
  //printf("left_second4:%d\n", left_second4);
  while(1){
    count++;
  }
  return 0;
}
